import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/UserLogin',
    method: 'post',
    data: { name: data.username, password: data.password }
  })
}

export function getInfo(token) {
  return request({
    url: '/UserInfo',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/UserLogout',
    method: 'get'
  })
}

export function getUserNewOpened(data) {
  return request({
    url: '/getUserNewOpened',
    method: 'post',
    data: data
  })
}

export function getJsonList(data) {
  return request({
    url: '/getJsonList',
    method: 'post',
    data: data
  })
}
